﻿Public Class cls_registry
    Dim RG As New cls_encription

    Private KeyName As String = "HKEY_CURRENT_USER\Software\ppdb2012"

    Public Sub setValue(ByVal ValueName As String, ByVal Value As String, Optional ByVal SALT As String = "uzumaki-yanto")
        My.Computer.Registry.SetValue(KeyName, ValueName, RG.StringToHex(RG.Convert(Value, SALT)), Microsoft.Win32.RegistryValueKind.String)
    End Sub

    Public Function getValue(ByVal ValueName As String, Optional ByVal SALT As String = "uzumaki-yanto") As String
        getValue = RG.Convert(RG.HexToString(My.Computer.Registry.GetValue(KeyName, ValueName, vbNullString)), SALT)
    End Function

End Class
